﻿using System;
using System.Collections;
using Huirui.Cavan.Domain.MainBoundedContext.StockModule;
using Huirui.Cavan.Domain.Seedwork;

namespace Huirui.Cavan.Domain.MainBoundedContext.PurchaseModule
{
    #region PurchaseOrderDetail

    /// <summary>
    /// PurchaseOrderDetail object for NHibernate mapped table 'PurchaseOrderDetail'.
    /// </summary>
    [Serializable]
    public class PurchaseOrderDetail : Persistent<long>
    {
        #region Member Variables

        protected decimal _number;
        protected decimal _unitCost;
        protected decimal _discountRate;
        protected decimal _discountAmount;
        protected decimal _purchaseAmount;
        protected decimal _wholeAmount;
        protected decimal _taxRate;
        protected decimal _taxAmount;
        protected decimal _unStockInNumber;
        protected decimal _unStockInAmount;
        protected DateTime? _stockInDate;
        protected string _description;
        protected PurchaseOrder _purchaseOrder;
        protected Stock _stock;
        protected WareHouse _wareHouse;

        #endregion

        #region Constructors

        public PurchaseOrderDetail() { }

        public PurchaseOrderDetail(decimal number, decimal unitCost, decimal discountRate, decimal discountAmount, decimal purchaseAmount, decimal wholeAmount, decimal taxRate, decimal taxAmount, string description, DateTime createDate, DateTime modifyDate, int editUser, Stock stock, WareHouse wareHouse)
        {
            this._number = number;
            this._unitCost = unitCost;
            this._discountRate = discountRate;
            this._discountAmount = discountAmount;
            this._purchaseAmount = purchaseAmount;
            this._wholeAmount = wholeAmount;
            this._taxRate = taxRate;
            this._taxAmount = taxAmount;
            this._description = description;
            this._createDate = createDate;
            this._modifyDate = modifyDate;
            this._editUser = editUser;
            this._stock = stock;
            this._wareHouse = wareHouse;
        }

        #endregion

        #region Public Properties


        public virtual decimal Number
        {
            get { return _number; }
            set { _number = value; }
        }

        public virtual decimal UnitCost
        {
            get { return _unitCost; }
            set { _unitCost = value; }
        }

        public virtual decimal DiscountRate
        {
            get { return _discountRate; }
            set { _discountRate = value; }
        }

        public virtual decimal DiscountAmount
        {
            get { return _discountAmount; }
            set { _discountAmount = value; }
        }

        public virtual decimal PurchaseAmount
        {
            get { return _purchaseAmount; }
            set { _purchaseAmount = value; }
        }

        public virtual decimal WholeAmount
        {
            get { return _wholeAmount; }
            set { _wholeAmount = value; }
        }

        public virtual decimal TaxRate
        {
            get { return _taxRate; }
            set { _taxRate = value; }
        }

        public virtual decimal TaxAmount
        {
            get { return _taxAmount; }
            set { _taxAmount = value; }
        }

        public virtual decimal UnStockInNumber
        {
            get { return _unStockInNumber; }
            set { _unStockInNumber = value; }
        }

        public virtual decimal UnStockInAmount
        {
            get { return _unStockInAmount; }
            set { _unStockInAmount = value; }
        }

        public virtual DateTime? StockInDate
        {
            get { return _stockInDate; }
            set { _stockInDate = value; }
        }

        public virtual string Description
        {
            get { return _description; }
            set
            {
                _description = value;
            }
        }

        public virtual PurchaseOrder PurchaseOrder
        {
            get { return _purchaseOrder; }
            set { _purchaseOrder = value; }
        }

        public virtual Stock Stock
        {
            get { return _stock; }
            set { _stock = value; }
        }

        public virtual WareHouse WareHouse
        {
            get { return _wareHouse; }
            set { _wareHouse = value; }
        }



        #endregion
    }
    #endregion
}